package com.xyj;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @author GuXiaoYao
 * @version 1.0.0
 * @since 2021/9/6
 */
public class TestSet {
    public static void main(String[] args) {
        List<String> stringList=new ArrayList<>();
        stringList.add("ss");
        stringList.add("wefwe");
        stringList.add("22222222222");
        Iterator<String> iterator = stringList.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
            iterator.remove();
        }
        System.out.println(stringList.size());

    }
}
